import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'

export default defineUniPages({
  globalStyle: {
    backgroundColor: '@bgColor',
    backgroundColorBottom: '@bgColorBottom',
    backgroundColorTop: '@bgColorTop',
    backgroundTextStyle: '@bgTxtStyle',
    navigationBarBackgroundColor: '#ffffff00',
    navigationBarTextStyle: 'black',
    navigationBarTitleText: '快跑吖',
    navigationStyle: 'custom',
    renderingMode: 'mixed',
  },
  easycom: {
    autoscan: true,
    custom: {
      // uni-ui 规则如下配置
      // '^uni-(.*)': '@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue',
      "^z-tabs": "@zxlee/z-tabs/components/z-tabs/z-tabs.vue",
    },
  },
  pages: [
    {
      path: 'pages/index',
      type: 'home',
      style: {
        onReachBottomDistance: 200, // 距离底部50px时触发
      }
    },
    {
      path: 'pages/login',
    },
    { path: 'pages/ClosingTime', type: 'page' },
    {
      path: 'pages/OrderDetails',
      style: {
        navigationStyle: 'default',
        navigationBarTitleText: '订单详情',
        navigationBarBackgroundColor: '#ffffff',
        navigationBarTextStyle: 'black',
      },
    },
    {
      path: 'pages/collect',
      style: {
        navigationStyle: 'default',
        navigationBarTitleText: '我的收藏',
        navigationBarBackgroundColor: '#ffffff',
        navigationBarTextStyle: 'black',
      },
    },
    {
      path: 'pages/ProductDetails',
      style: {
        navigationStyle: 'default',
        navigationBarTitleText: '商品详情',
        navigationBarBackgroundColor: '#ffffff',
        navigationBarTextStyle: 'black',
      },
    },
    {
      path: 'pages/Payment',
      style: {
        navigationStyle: 'default',
        navigationBarTitleText: '支付页面',
        navigationBarBackgroundColor: '#ffffff',
        navigationBarTextStyle: 'black',
      },
    },
    {
      path: 'pages/RiderOrderDetail',
      style: {
        navigationStyle: 'default',
        navigationBarTitleText: '骑手订单详情',
        navigationBarBackgroundColor: '#ffffff',
        navigationBarTextStyle: 'black',
      },
    },
    {
      path: 'pages/HelpCenter',
      style: {
        navigationStyle: 'default',
        navigationBarTitleText: '帮助中心',
        navigationBarBackgroundColor: '#ffffff',
        navigationBarTextStyle: 'black',
      },
    },
  ],
  subPackages: [
    {
      root: 'pages-shift',
      pages: [
        { path: 'Address', type: 'page' },
        { path: 'ShopDeliveryOrder', type: 'page' },
        {
          path: 'AboutUs', type: 'page',
          style: {
            navigationStyle: 'default',
            navigationBarTitleText: '关于我们',
            navigationBarBackgroundColor: '#ffffff',
            navigationBarTextStyle: 'black',
          },
        },
        {
          path: 'PrivacyPolicy', type: 'page',
          style: {
            navigationStyle: 'default',
            navigationBarTitleText: '隐私政策',
            navigationBarBackgroundColor: '#ffffff',
            navigationBarTextStyle: 'black',
          },
        },
        {
          path: 'UserAgreement', type: 'page',
          style: {
            navigationStyle: 'default',
            navigationBarTitleText: '用户协议',
            navigationBarBackgroundColor: '#ffffff',
            navigationBarTextStyle: 'black',
          },
        },
        {
          path: 'ContactUs', type: 'page',
          style: {
            navigationStyle: 'default',
            navigationBarTitleText: '联系我们',
            navigationBarBackgroundColor: '#ffffff',
            navigationBarTextStyle: 'black',
          },
        },
        {
          path: 'MerchantEntry', type: 'page',
          style: {
            navigationStyle: 'default',
            navigationBarTitleText: '商家入驻协议',
            navigationBarBackgroundColor: '#ffffff',
            navigationBarTextStyle: 'black',
          },
        },
        {
          path: 'Equity', type: 'page',
          style: {
            navigationStyle: 'default',
            navigationBarTitleText: '权益保障',
            navigationBarBackgroundColor: '#ffffff',
            navigationBarTextStyle: 'black',
          },
        },
      ],
    }
  ],
})
